#include <ScreenCapture.au3>

CaptureScreen()

Func CaptureScreen()
   ; Capture full screen
   Dim $i=0

   If Not FileExists (@MyDocumentsDir & "\Screenshot") Then
	  DirCreate(@MyDocumentsDir & "\Screenshot")
   EndIf

   While True
	  Sleep(3000)
	  _ScreenCapture_Capture(@MyDocumentsDir & "\Screenshot\screen_"& $i &".png")
	  $i=$i+1
	  If $i > 20 Then $i=0
   WEnd
EndFunc   ;==>Example
